/*
 * MIT License
 *
 * Copyright (c) 2025 Mark·虎
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

package com.hsxxherp.key.uia.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hsxxherp.key.support.model.entity.BaseAuditEntity;

import java.math.BigDecimal;

;

/**
 * 参数明细
 *
 * @author Mark·虎（2486970363@qq.com）
 */
@TableName("sys_app_parameter_detail")
public class SysAppParameterDetail extends BaseAuditEntity {

    @TableId(type = IdType.ASSIGN_ID)
    private String detailId;
    /**
     * 对应版本
     */
    @TableField("template_version_id")
    private String templateVersionId;
    /**
     * 参数key
     */
    @TableField("param_key")
    private String paramKey;
    /**
     * 参数名
     */
    @TableField("param_name")
    private String paramName;
    /**
     * 参数注释
     */
    @TableField("param_description")
    private String paramDescription;
    /**
     * 类别
     */
    @TableField("param_type")
    private ParamType paramType;
    /**
     * 最小长度
     */
    @TableField("min_length")
    private Integer minLength;
    /**
     * 最大长度
     */
    @TableField("max_length")
    private Integer maxLength;
    /**
     * 枚举可选范围
     */
    @TableField("enum_options")
    private String enumOptions;
    /**
     * 最小值
     */
    @TableField("min_value")
    private BigDecimal minValue;
    /**
     * 最大值
     */
    @TableField("max_value")
    private BigDecimal maxValue;
    /**
     * 默认值
     */
    @TableField("default_value")
    private String defaultValue;
    /**
     * 排序
     */
    @TableField("sort_order")
    private Integer sortOrder;

    public String getDetailId() {
        return detailId;
    }

    public void setDetailId(String detailId) {
        this.detailId = detailId;
    }

    public String getTemplateVersionId() {
        return templateVersionId;
    }

    public void setTemplateVersionId(String templateVersionId) {
        this.templateVersionId = templateVersionId;
    }

    public String getParamKey() {
        return paramKey;
    }

    public void setParamKey(String paramKey) {
        this.paramKey = paramKey;
    }

    public String getParamName() {
        return paramName;
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    public String getParamDescription() {
        return paramDescription;
    }

    public void setParamDescription(String paramDescription) {
        this.paramDescription = paramDescription;
    }

    public ParamType getParamType() {
        return paramType;
    }

    public void setParamType(ParamType paramType) {
        this.paramType = paramType;
    }

    public Integer getMinLength() {
        return minLength;
    }

    public void setMinLength(Integer minLength) {
        this.minLength = minLength;
    }

    public Integer getMaxLength() {
        return maxLength;
    }

    public void setMaxLength(Integer maxLength) {
        this.maxLength = maxLength;
    }

    public String getEnumOptions() {
        return enumOptions;
    }

    public void setEnumOptions(String enumOptions) {
        this.enumOptions = enumOptions;
    }

    public BigDecimal getMinValue() {
        return minValue;
    }

    public void setMinValue(BigDecimal minValue) {
        this.minValue = minValue;
    }

    public BigDecimal getMaxValue() {
        return maxValue;
    }

    public void setMaxValue(BigDecimal maxValue) {
        this.maxValue = maxValue;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public Integer getSortOrder() {
        return sortOrder;
    }

    public void setSortOrder(Integer sortOrder) {
        this.sortOrder = sortOrder;
    }

    /**
     * 参数类型
     */
    public enum ParamType {
        /**
         * 字符串
         */
        STRING,
        /**
         * 布尔
         */
        BOOLEAN,
        /**
         * 枚举
         */
        ENUM,
        /**
         * 数值
         */
        NUMBER
    }
}